package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingLevel;
import com.zzyl.vo.NursingLevelVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description NursingLevelMapper
 * @Author liangDong
 * @Date 2025-05-09  14:13
 */
@Mapper
public interface NursingLevelMapper {

    List<NursingLevelVo> selectAll();

    @Insert("insert into nursing_level (name, lplan_id, fee, description, create_by, remark,create_time) " +
            "VALUE (#{name},#{planId},#{fee},#{description},#{createBy},#{remark},#{createTime})")
    void insert(NursingLevel nursingLevel);

    Page<NursingLevelVo> page(String name, Integer status);


    NursingLevelVo selectById(Long levelId);

    void update(NursingLevel nursingLevel);

    @Delete("delete from nursing_level where id = #{id}")
    void delete(Integer id);
}
